<?php

use Illuminate\Database\Seeder;

class UserTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(\App\User::class,20)->create();
        //利用数据工厂填充完数据后更新第一条数据，作为管理员测试
        $user=\App\User::first();
        $user->name='孟菊';
        $user->email='2440979782@qq.com';
        $user->password=bcrypt('1');
        $user->phone=15851850211;
        $user->is_admin=0;
        $user->email_valid=0;
        $user->mobile_valid=0;
        $user->is_admin=1;
        $user->icon='https:/1bF201510%2F06%2F20151006170548_cyVCN.thumb.700_0.jpeg';
        $user->save();
    }
}
